Imports System.Windows.Data
Imports System
Namespace Xceed.Silverlight.Documentation
Public Class InverseBooleanConverter
Implements IValueConverter
Public Function Convert( ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo ) As Object Implements IValueConverter.Convert
If TypeOf value Is Boolean Then
Return Not CBool( value )
End If
Return value
End Function
Public Function ConvertBack( ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo ) As Object Implements IValueConverter.ConvertBack
If TypeOf value Is Boolean Then
Return Not CBool( value )
End If
Return value
End Function
End Class
End Namespace